package com.letoken.platform.repo.mall.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 商城消费发行、流通记录
 * </p>
 *
 * @author 作者
 * @since 2023-04-20
 */
@Getter
@Setter
@TableName("app_mall_issue_history")
@ApiModel(value = "AppMallIssueHistory对象", description = "商城消费发行、流通记录")
public class AppMallIssueHistory extends Model<AppMallIssueHistory> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("编号")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("用户编号")
    @TableField("user_id")
    private Integer userId;

    @ApiModelProperty("交易类型(1.消费发行 2.让利发行 3.周期流动 4.直推加速  5。团队加速 6.推荐奖励 7.卡劵加速)")
    @TableField("type")
    private Integer type;

    @ApiModelProperty("数量")
    @TableField("amount")
    private BigDecimal amount;

    @ApiModelProperty("发行id   周期流通为空")
    @TableField("issue_id")
    private String issueId;

    @ApiModelProperty("创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;


    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
